package com.lyn.andplugin

import android.Manifest
import android.os.Build
import android.os.Bundle
import com.lyn.andplugin.databinding.ActivityMainBinding
import com.lyn.andplugin.fragment.PluginFragment
import com.lyn.ui.activity.BaseActivity

/**
 *
 * @author longyn 2025/07/04
 * @version 1.0.0
 */
class MainActivity : BaseActivity<ActivityMainBinding>() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            requestPermissions(arrayOf(Manifest.permission_group.STORAGE), 1)
        }
        App.initializeLiveData.observe(this) {
            supportFragmentManager.beginTransaction()
                .replace(binding.content.id, PluginFragment())
                .commit()
        }
    }
}